<div class="page_title">
    <span class="title_icon"><span class="blocks_images"></span></span>
    <h3>Unidades</h3>    
</div>
<div id="content">
    <div class="grid_container">
        <div class="grid_12">
            <div class="widget_wrap">
                <div class="widget_top">
                    <span class="h_icon blocks_images"></span>
                    <h6>Listado de Unidades</h6>
                </div>
                <div class="widget_content">                    
                    <table class="display data_tbl">
                        <thead>
                            <tr>
                                
                                <th>Nombre</th>
                                <th>Simbolo</th>                                                         
                                <th>Unidad</th>
                                <th>Acciones</th>
                            </tr>
                        </thead>
                        <tbody>
                             <?php
                             $i=1;   
                            foreach ($unidades as $p): 
                            ?>
                                <tr class="gradeA">
                                             
                                    <td><?php echo h($p['Unidade']['nombre']); ?></td>     
                                    <td><?php echo h($p['Unidade']['simbolo']); ?></td>               
                                    <td><?php echo h($p['Unidade']['unidad']); ?></td>
                                    <td>
                                        <?php echo $this->Html->link('EDITAR', array('action'=>'edit', $p['Unidade']['id']))?>
                                        &nbsp;
                                        <?php echo $this->Html->link('ELIMINAR', array('action'=>'delete', $p['Unidade']['id']),null,'esta seguro de eliminar '.$p['Unidade']['nombre'].'?')?>                                        
                                    </td>                     
                                </tr>                           
                            <?php endforeach; ?>
                        </tbody>
                        <!--<tfoot>
                            <tr>
                                <th>Nombre</th>
                                <th>Descripcion</th>
                                
                            </tr>
                        </tfoot>
                        -->
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="unidades index">
    <h2><?php echo __('Unidades'); ?></h2>
    
    <table cellpadding="0" cellspacing="0">
        <tr>
            
            <th><?php echo $this->Paginator->sort('nombre'); ?></th>
            <th><?php echo $this->Paginator->sort('simbolo'); ?></th>
            <th><?php echo $this->Paginator->sort('unidad'); ?></th>          
            <th class="actions"><?php echo __('Actions'); ?></th>
        </tr>
        <?php foreach ($unidades as $lb): ?>
            <tr>                
                <td><?php echo h($lb['Unidade']['nombre']); ?>&nbsp;</td>                
                <td><?php echo h($lb['Unidade']['simbolo']); ?>&nbsp;</td>
                <td><?php echo h($lb['Unidade']['unidad']); ?>&nbsp;</td>
                
                <td class="actions">
                    <?php echo $this->Html->link(__('View'), array('action' => 'view', $lb['Unidade']['id'])); ?>
                    <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $lb['Unidade']['id'])); ?>
                    <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $lb['Unidade']['id']), null, __('Are you sure you want to delete # %s?', $lb['Unidade']['id'])); ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
            'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
        ));
        ?>	</p>
    <div class="paging">
        <?php
        echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
        echo $this->Paginator->numbers(array('separator' => ''));
        echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
        ?>
    </div>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('New Unidad'), array('action' => 'add')); ?></li>
    </ul>
</div>
